<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DGRv2: helper/dgr-tcp-application-helper.cc Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">DGRv2<span id="projectnumber">&#160;2-dev</span>
   </div>
   <div id="projectbrief">A Delay-Guaranteed Routing Protocol model in ns-3</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('d4/dbb/dgr-tcp-application-helper_8cc_source.html','../../'); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">dgr-tcp-application-helper.cc</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d4/dbb/dgr-tcp-application-helper_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/* -*- Mode:C++; c-file-style:&quot;gnu&quot;; indent-tabs-mode:nil; -*- */</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="preprocessor">#include &quot;<a class="code" href="../../dc/d34/dgr-tcp-application-helper_8h.html">dgr-tcp-application-helper.h</a>&quot;</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="preprocessor">#include &quot;ns3/inet-socket-address.h&quot;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="preprocessor">#include &quot;ns3/packet-socket-address.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="preprocessor">#include &quot;ns3/string.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#include &quot;ns3/names.h&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d7/d2e/namespacens3.html">ns3</a> {</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#aad85c16ff200bdde6abd8c14ee787c72">   11</a></span><a class="code hl_function" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#aad85c16ff200bdde6abd8c14ee787c72">DGRTcpAppHelper::DGRTcpAppHelper</a> (std::string protocol, Address address)</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span>{</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span>  <a class="code hl_variable" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#af2ed4227d123d8957f3aa6b6e3710dfd">m_factory</a>.SetTypeId (<span class="stringliteral">&quot;ns3::DGRTcpApplication&quot;</span>);</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span>  <a class="code hl_variable" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#af2ed4227d123d8957f3aa6b6e3710dfd">m_factory</a>.Set (<span class="stringliteral">&quot;Protocol&quot;</span>, StringValue (protocol));</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span>  <a class="code hl_variable" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#af2ed4227d123d8957f3aa6b6e3710dfd">m_factory</a>.Set (<span class="stringliteral">&quot;Remote&quot;</span>, AddressValue (address));</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span>}</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="keywordtype">void</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a539f8b98bfc4abea9cf3ad81eefe9808">   19</a></span><a class="code hl_function" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a539f8b98bfc4abea9cf3ad81eefe9808">DGRTcpAppHelper::SetAttribute</a> (std::string name, <span class="keyword">const</span> AttributeValue &amp;value)</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span>{</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span>  <a class="code hl_variable" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#af2ed4227d123d8957f3aa6b6e3710dfd">m_factory</a>.Set (name, value);</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span>}</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span>ApplicationContainer</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#abae05b9b0d562e6674b924431f9231ec">   25</a></span><a class="code hl_function" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a91b669aff39a474e9c269dcf5a9818bd">DGRTcpAppHelper::Install</a> (Ptr&lt;Node&gt; node)<span class="keyword"> const</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span>  <span class="keywordflow">return</span> ApplicationContainer (<a class="code hl_function" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a63d0f9d738361206fb091e66795142e9">InstallPriv</a> (node));</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span>}</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span>ApplicationContainer</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a6406ac7cf428b0b70a0098b1a01f420b">   31</a></span><a class="code hl_function" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a91b669aff39a474e9c269dcf5a9818bd">DGRTcpAppHelper::Install</a> (std::string nodeName)<span class="keyword"> const</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>  Ptr&lt;Node&gt; node = Names::Find&lt;Node&gt; (nodeName);</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>  <span class="keywordflow">return</span> ApplicationContainer (<a class="code hl_function" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a63d0f9d738361206fb091e66795142e9">InstallPriv</a> (node));</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>}</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>ApplicationContainer</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a91b669aff39a474e9c269dcf5a9818bd">   38</a></span><a class="code hl_function" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a91b669aff39a474e9c269dcf5a9818bd">DGRTcpAppHelper::Install</a> (NodeContainer c)<span class="keyword"> const</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span>  ApplicationContainer apps;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>  <span class="keywordflow">for</span> (NodeContainer::Iterator <a class="code hl_variable" href="../../d7/d2e/namespacens3.html#aa5e169e2453984d2f21c0d5cec9e907b">i</a> = c.Begin (); <a class="code hl_variable" href="../../d7/d2e/namespacens3.html#aa5e169e2453984d2f21c0d5cec9e907b">i</a> != c.End (); ++<a class="code hl_variable" href="../../d7/d2e/namespacens3.html#aa5e169e2453984d2f21c0d5cec9e907b">i</a>)</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>    {</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>      apps.Add (<a class="code hl_function" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a63d0f9d738361206fb091e66795142e9">InstallPriv</a> (*<a class="code hl_variable" href="../../d7/d2e/namespacens3.html#aa5e169e2453984d2f21c0d5cec9e907b">i</a>));</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>    }</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>  <span class="keywordflow">return</span> apps;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>}</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>Ptr&lt;Application&gt;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a63d0f9d738361206fb091e66795142e9">   50</a></span><a class="code hl_function" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a63d0f9d738361206fb091e66795142e9">DGRTcpAppHelper::InstallPriv</a> (Ptr&lt;Node&gt; node)<span class="keyword"> const</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>  Ptr&lt;Application&gt; app = <a class="code hl_variable" href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#af2ed4227d123d8957f3aa6b6e3710dfd">m_factory</a>.Create&lt;<a class="code hl_class" href="../../de/d6b/class_application.html">Application</a>&gt; ();</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>  node-&gt;AddApplication (app);</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>  <span class="keywordflow">return</span> app;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span>}</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>} <span class="comment">// namespace ns3</span></div>
<div class="ttc" id="aclass_application_html"><div class="ttname"><a href="../../de/d6b/class_application.html">Application</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_tcp_app_helper_html_a539f8b98bfc4abea9cf3ad81eefe9808"><div class="ttname"><a href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a539f8b98bfc4abea9cf3ad81eefe9808">ns3::DGRTcpAppHelper::SetAttribute</a></div><div class="ttdeci">void SetAttribute(std::string name, const AttributeValue &amp;value)</div><div class="ttdoc">Helper function used to set the underlying application attributes, not the socket attributes.</div><div class="ttdef"><b>Definition</b> <a href="../../d4/dbb/dgr-tcp-application-helper_8cc_source.html#l00019">dgr-tcp-application-helper.cc:19</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_tcp_app_helper_html_a63d0f9d738361206fb091e66795142e9"><div class="ttname"><a href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a63d0f9d738361206fb091e66795142e9">ns3::DGRTcpAppHelper::InstallPriv</a></div><div class="ttdeci">Ptr&lt; Application &gt; InstallPriv(Ptr&lt; Node &gt; node) const</div><div class="ttdoc">Install an ns3::BulkSendApplication on the node configured with all the attributes set with SetAttrib...</div><div class="ttdef"><b>Definition</b> <a href="../../d4/dbb/dgr-tcp-application-helper_8cc_source.html#l00050">dgr-tcp-application-helper.cc:50</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_tcp_app_helper_html_a91b669aff39a474e9c269dcf5a9818bd"><div class="ttname"><a href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#a91b669aff39a474e9c269dcf5a9818bd">ns3::DGRTcpAppHelper::Install</a></div><div class="ttdeci">ApplicationContainer Install(NodeContainer c) const</div><div class="ttdoc">Install an ns3::BulkSendApplication on each node of the input container configured with all the attri...</div><div class="ttdef"><b>Definition</b> <a href="../../d4/dbb/dgr-tcp-application-helper_8cc_source.html#l00038">dgr-tcp-application-helper.cc:38</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_tcp_app_helper_html_aad85c16ff200bdde6abd8c14ee787c72"><div class="ttname"><a href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#aad85c16ff200bdde6abd8c14ee787c72">ns3::DGRTcpAppHelper::DGRTcpAppHelper</a></div><div class="ttdeci">DGRTcpAppHelper(std::string protocol, Address address)</div><div class="ttdoc">Create an DGRTcpAppHelper to make it easier to work with BulkSendApplications.</div><div class="ttdef"><b>Definition</b> <a href="../../d4/dbb/dgr-tcp-application-helper_8cc_source.html#l00011">dgr-tcp-application-helper.cc:11</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_tcp_app_helper_html_af2ed4227d123d8957f3aa6b6e3710dfd"><div class="ttname"><a href="../../d2/d74/classns3_1_1_d_g_r_tcp_app_helper.html#af2ed4227d123d8957f3aa6b6e3710dfd">ns3::DGRTcpAppHelper::m_factory</a></div><div class="ttdeci">ObjectFactory m_factory</div><div class="ttdoc">Object factory.</div><div class="ttdef"><b>Definition</b> <a href="../../dc/d34/dgr-tcp-application-helper_8h_source.html#l00084">dgr-tcp-application-helper.h:84</a></div></div>
<div class="ttc" id="adgr-tcp-application-helper_8h_html"><div class="ttname"><a href="../../dc/d34/dgr-tcp-application-helper_8h.html">dgr-tcp-application-helper.h</a></div></div>
<div class="ttc" id="anamespacens3_html"><div class="ttname"><a href="../../d7/d2e/namespacens3.html">ns3</a></div><div class="ttdef"><b>Definition</b> <a href="../../d5/d65/dgr-application-helper_8cc_source.html#l00027">dgr-application-helper.cc:27</a></div></div>
<div class="ttc" id="anamespacens3_html_aa5e169e2453984d2f21c0d5cec9e907b"><div class="ttname"><a href="../../d7/d2e/namespacens3.html#aa5e169e2453984d2f21c0d5cec9e907b">ns3::i</a></div><div class="ttdeci">int i</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00169">dgr-sink.cc:169</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_d634f21e635b1ea642c8b957ecf78b4f.html">helper</a></li><li class="navelem"><a class="el" href="../../d4/dbb/dgr-tcp-application-helper_8cc.html">dgr-tcp-application-helper.cc</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7 </li>
  </ul>
</div>
</body>
</html>
